package com.li.designpattern.memento;

import java.util.ArrayList;
import java.util.List;

public class CareTaker {
	private List<Memento>  list=new ArrayList<Memento>();
	
	public void addMemento(Memento memento){
		list.add(memento);
	}

	public List<Memento> getList() {
		return list;
	}

	public void setList(List<Memento> list) {
		this.list = list;
	}
	
	public Memento getMementoFromList(int index){
		return list.get(index);
	}
	
}
